package top.spring.study.config;

import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.core.env.PropertyResolver;

@Configuration
public class MyProjectcEnvironment implements EnvironmentAware {

    private PropertyResolver propertyResolver;
    @Override
    public void setEnvironment(Environment environment) {
        propertyResolver = environment;
        System.out.println("project.name--->" + propertyResolver.getProperty("project.name"));
    }
}
